using System.Data.Entity;
using System.Data.Entity.Infrastructure;
using CubicFWNet.Data.Models.Mapping;

namespace CubicFWNet.Data.Models
{
    public partial class YJXErpContext : DbContext
    {
        static YJXErpContext()
        {
            Database.SetInitializer<YJXErpContext>(null);
        }

        public YJXErpContext() : base("Name=YJXErpContext") { }
        //public YJXErpContext()
        //    : base(ConnectionConfigPara.EFDBConnection)
        //{
        //}
        public DbSet<Arap> Araps { get; set; }
        public DbSet<CollectAndPayMent> CollectAndPayMents { get; set; }
        public DbSet<Customer> Customers { get; set; }
        public DbSet<CustomerProduct> CustomerProducts { get; set; }
        public DbSet<DeliveryProduct> DeliveryProducts { get; set; }
        public DbSet<Examine> Examines { get; set; }
        public DbSet<Equipment> Equipments { get; set; }
        public DbSet<GradeMaintenance> GradeMaintenances { get; set; }
        public DbSet<ExpressOrder> ExpressOrders { get; set; }
        public DbSet<FinanceCost> FinanceCosts { get; set; }
        public DbSet<FinanceInvoice> FinanceInvoices { get; set; }
        public DbSet<FinanceNum> FinanceNums { get; set; }
        public DbSet<Inventory> Inventories { get; set; }
        public DbSet<InventoryRecord> InventoryRecords { get; set; }
        public DbSet<InvoceType> InvoceTypes { get; set; }
        public DbSet<Invoice> Invoices { get; set; }
        public DbSet<InvoiceOther> InvoiceOthers { get; set; }
        public DbSet<Item> Items { get; set; }
        public DbSet<ItemCategory> ItemCategories { get; set; }
        public DbSet<LogInLog> LogInLogs { get; set; }
        public DbSet<Module> Modules { get; set; }
        public DbSet<News> News { get; set; }
        public DbSet<NewsRecord> NewsRecords { get; set; }
        public DbSet<NewsType> NewsTypes { get; set; }
        public DbSet<OperateRecord> OperateRecords { get; set; }
        public DbSet<OperateRecordType> OperateRecordTypes { get; set; }
        public DbSet<Order> Orders { get; set; }
        public DbSet<OrderProduct> OrderProducts { get; set; }
        public DbSet<OrderStatus> OrderStatuss { get; set; }
        public DbSet<OriginalCost> OriginalCosts { get; set; }
        public DbSet<Product> Products { get; set; }
        public DbSet<ProfitRatio> ProfitRatios { get; set; }
        public DbSet<Purchase> Purchases { get; set; }
        public DbSet<PurchaseCompose> PurchaseComposes { get; set; }
        public DbSet<PurchasePrint> PurchasePrints { get; set; }
        public DbSet<PurchasePrintSub> PurchasePrintSubs { get; set; }
        public DbSet<PurchaseReconciliation> PurchaseReconciliations { get; set; }
        public DbSet<Relation> Relations { get; set; }
        public DbSet<RelationType> RelationTypes { get; set; }
        public DbSet<Relevance> Relevances { get; set; }
        public DbSet<Role> Roles { get; set; }
        public DbSet<SendCar> SendCars { get; set; }
        public DbSet<StorageTable> StorageTables { get; set; }
        public DbSet<TechMaterial> TechMaterials { get; set; }
        public DbSet<TechnologyManage> TechnologyManages { get; set; }
        public DbSet<TechnologyItem> TechnologyItems { get; set; }
        public DbSet<TechType> TechTypes { get; set; }
        public DbSet<Technology> Technologies { get; set; }
        public DbSet<User> Users { get; set; }
        public DbSet<Worksheet> Worksheets { get; set; }
        public DbSet<MaterialFormat> MaterialFormats { get; set; }
        public DbSet<InventoryUer> InventoryUers { get; set; }
        public DbSet<TaskRemind> TaskReminds { get; set; }
        public DbSet<PageTask> PageTasks { get; set; }
        public DbSet<InventoryChange> InventoryChanges { get; set; }
        public DbSet<InventoryChangeApply> InventoryChangeApplys { get; set; }
        public DbSet<Storage> Storage { get; set; }
        public DbSet<TakeLog> TakeLog { get; set; }
        public DbSet<Category> Categorys { get; set; }
        
        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            modelBuilder.Configurations.Add(new ArapMap());
            modelBuilder.Configurations.Add(new CollectAndPayMentMap());
            modelBuilder.Configurations.Add(new CustomerMap());
            modelBuilder.Configurations.Add(new CustomerProductMap());
            modelBuilder.Configurations.Add(new DeliveryProductMap());
            modelBuilder.Configurations.Add(new ExamineMap());
            modelBuilder.Configurations.Add(new GradeMaintenanceMap());
            modelBuilder.Configurations.Add(new EquipmentMap());
            modelBuilder.Configurations.Add(new ExpressOrderMap());
            modelBuilder.Configurations.Add(new FinanceCostMap());
            modelBuilder.Configurations.Add(new FinanceInvoiceMap());
            modelBuilder.Configurations.Add(new FinanceNumMap());
            modelBuilder.Configurations.Add(new InventoryMap());
            modelBuilder.Configurations.Add(new InventoryUerMap());
            modelBuilder.Configurations.Add(new InventoryRecordMap());
            modelBuilder.Configurations.Add(new InvoceTypeMap());
            modelBuilder.Configurations.Add(new InvoiceMap());
            modelBuilder.Configurations.Add(new InvoiceOtherMap());
            modelBuilder.Configurations.Add(new ItemMap());
            modelBuilder.Configurations.Add(new ItemCategoryMap());
            modelBuilder.Configurations.Add(new LogInLogMap());
            modelBuilder.Configurations.Add(new ModuleMap());
            modelBuilder.Configurations.Add(new NewsMap());
            modelBuilder.Configurations.Add(new NewsRecordMap());
            modelBuilder.Configurations.Add(new NewsTypeMap());
            modelBuilder.Configurations.Add(new OperateRecordMap());
            modelBuilder.Configurations.Add(new OperateRecordTypeMap());
            modelBuilder.Configurations.Add(new OrderMap());
            modelBuilder.Configurations.Add(new OrderProductMap());
            modelBuilder.Configurations.Add(new OrderStatusMap());
            modelBuilder.Configurations.Add(new OriginalCostMap());
            modelBuilder.Configurations.Add(new PageTaskMap());
            modelBuilder.Configurations.Add(new ProductMap());
            modelBuilder.Configurations.Add(new ProfitRatioMap());
            modelBuilder.Configurations.Add(new PurchaseMap());
            modelBuilder.Configurations.Add(new PurchaseComposeMap());
            modelBuilder.Configurations.Add(new PurchasePrintMap());
            modelBuilder.Configurations.Add(new PurchasePrintSubMap());
            modelBuilder.Configurations.Add(new PurchaseReconciliationMap());
            modelBuilder.Configurations.Add(new RelationMap());
            modelBuilder.Configurations.Add(new RelationTypeMap());
            modelBuilder.Configurations.Add(new RelevanceMap());
            modelBuilder.Configurations.Add(new RoleMap());
            modelBuilder.Configurations.Add(new SendCarMap());
            modelBuilder.Configurations.Add(new StorageTableMap());
            modelBuilder.Configurations.Add(new TaskRemindMap());
            modelBuilder.Configurations.Add(new TechMaterialMap());
            modelBuilder.Configurations.Add(new TechnologyMap());
            modelBuilder.Configurations.Add(new TechnologyManageMap());
            modelBuilder.Configurations.Add(new TechnologyItemMap());
            modelBuilder.Configurations.Add(new TechTypeMap());
            modelBuilder.Configurations.Add(new UserMap());
            modelBuilder.Configurations.Add(new WorksheetMap());
            modelBuilder.Configurations.Add(new MaterialFormatMap());
            modelBuilder.Configurations.Add(new InventoryChangeMap());
            modelBuilder.Configurations.Add(new InventoryChangeApplyMap());
            modelBuilder.Configurations.Add(new StorageMap());
            modelBuilder.Configurations.Add(new TakeLogMap());
            modelBuilder.Configurations.Add(new CategoryMap());

        }
    }
}
